<?php
/**
 * Create By: PhpStorm
 * User: niechenguang
 * File: Circle.php
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;

use app\api\model\page\common\GetComicfansExperience;
use app\api\model\page\common\AddComicfansExperience;
use app\api\model\page\common\UpdateComicfansExperience;
use app\api\model\page\common\DeleteComicfansExperience;
use app\api\model\page\common\UploadImage;
use app\api\model\page\common\GetFlashSale;
use think\Request;

class Common
{

    protected $param;

    private $objUploadImage;
    private $objGetFlashSale;
    private $objGetComicfansExperience;
    private $objAddComicfansExperience;
    private $objUpdateComicfansExperience;
    private $objDeleteComicfansExperience;

    public function __construct()
    {
        $this->param = Request::instance()->param();
        $this->objUploadImage = new UploadImage();
        $this->objGetFlashSale = new GetFlashSale();
        $this->objGetComicfansExperience = new GetComicfansExperience();
        $this->objAddComicfansExperience = new AddComicfansExperience();
        $this->objUpdateComicfansExperience = new UpdateComicfansExperience();
        $this->objDeleteComicfansExperience = new DeleteComicfansExperience();
    }

    /**
     * 上传图片
     *
     * @return array
     */
    public function uploadImage()
    {
        return $this->objUploadImage->excute($this->param);
    }

    public function getFlashSale()
    {
        return $this->objGetFlashSale->excute($this->param);
    }

    public function getComicfansExperience()
    {
        return $this->objGetComicfansExperience->excute($this->param);
    }

    public function addComicfansExperience()
    {
        return $this->objAddComicfansExperience->excute($this->param);
    }

    public function updateComicfansExperience()
    {
        return $this->objUpdateComicfansExperience->excute($this->param);
    }

    public function deleteComicfansExperience()
    {
        return $this->objDeleteComicfansExperience->excute($this->param);
    }
}
